package cn.cloudreal.cbms.system.service.impl;

import java.util.List;

import cn.cloudreal.cbms.system.dao.PurviewDao;
import cn.cloudreal.cbms.system.service.PurviewService;
import cn.cloudreal.cbms.vo.Purview;

/**
 * 实现类型
 * 
 * @author Gao_xuejiao
 */
public class PurviewServiceImpl implements PurviewService
{

    private PurviewDao purviewDao;

    public PurviewDao getPurviewDao()
    {
        return purviewDao;
    }

    public void setPurviewDao(PurviewDao purviewDao)
    {
        this.purviewDao = purviewDao;
    }

    public int addPurview(Purview purview)
    {
        // TODO Auto-generated method stub
        return purviewDao.addPurview(purview);
    }

    public void delPurview(Purview purview)
    {
        // TODO Auto-generated method stub
        purviewDao.delPurview(purview);
    }

    public List<Purview> getAllPurviews(Purview purview)
    {
        // TODO Auto-generated method stub
        return purviewDao.getAllPurviews(purview);
    }

    public Purview getPurview(Integer id)
    {
        // TODO Auto-generated method stub
        return purviewDao.getPurview(id);
    }

    public void updatePurview(Purview purview)
    {
        // TODO Auto-generated method stub
        purviewDao.updatePurview(purview);
    }

    /**
     * 根据roleCode查询集合信息
     * 
     * @param page
     * @return Purview
     */
    public List<Purview> getPurviewsByRole(String roleCode)
    {
        return purviewDao.getPurviewsByRole(roleCode);
    }

    /**
     * 根据权限id 查询是否被使用
     * 
     * @param page
     * @return Purview
     */
    public boolean isUsePurview(Integer id)
    {
        return purviewDao.isUsePurview(id);
    }
}
